/*! 
 * Common utilties for PhxEngine.
 *
 * \author Devis Rossini
 * \date 14 April 2012
 */
#ifndef PHXUTILS_H_INCLUDE_GUARD
#define PHXUTILS_H_INCLUDE_GUARD

#include "PhxCore.h"

namespace PhxUtils
{
	inline int RoundReal(const phx::real iNum)
	{
		phx::real decimalPart = iNum - (int)iNum;
		if (decimalPart < 0.5f) return (int)iNum;
		else return (int)(iNum + 1);
	}
}

#endif // PHXUTILS_H_INCLUDE_GUARD